// ignore_for_file: file_names, slash_for_doc_comments, prefer_is_not_operator, prefer_is_empty


/**类型判空 */
class FFEmpty{

  /**
   * @description: 判断字符串是否为空
   * @param {*}
   * @return {*}
   */
  static bool stringIsEmpty(dynamic str) {
    if (str == null) {
      return true;
    }

    if (!(str is String)) {
      return true;
    }

    if (str.length < 1) {
      return true;
    }

    return false;
  }

  /**
   * @description: 判断list是否为空
   * @param {*}
   * @return {*}
   */
  static bool listIsEmpty(dynamic list) {
    if (list == null) {
      return true;
    }

    if (!(list is List)) {
      return true;
    }

    if (list.length < 1) {
      return true;
    }

    return false;
  }

  /**
   * @description: 判断map是否为空
   * @param {*}
   * @return {*}
   */
  static bool mapIsEmpty(dynamic map) {
    if (map == null) {
      return true;
    }

    if (!(map is Map)) {
      return true;
    }

    if (map.length < 1) {
      return true;
    }

    return false;
  }
}